package com.atguigu.a_stringbuilder;

public class Demo1 {
    public static void main(String[] args) {

        StringBuilder sb = new StringBuilder();

        StringBuilder append = sb.append("hello");

        System.out.println("sb = " + sb);
        System.out.println("append = " + append);

        System.out.println(sb == append);

        //因为返回的是自己 : 所以没有必要接收结果
        sb.append(100);

        System.out.println("sb = " + sb);

        //因为返回的是自己 : 所以可以链式编程 [尽量不要链式编程]
        sb.append("PHP").append(true).append(13.14);

        System.out.println("sb = " + sb);
    }
}
